<?php
declare (strict_types=1);

namespace app\model;


use app\constant\ModelConstant;
use think\helper\Arr;
use think\helper\Str;
use think\model\relation\HasMany;
use think\Request;

/**
 * @property string $pixel_id
 * @property string $name
 * @property string $status
 * @property string $api_secret
 */
class FacebookPixels extends BaseModel
{
    public $autoWriteTimestamp = false;
    protected $field = [
        'pixel_id', 'name', 'status',
    ];

    public static function getPixelIds()
    {
        $pixelIds = self::where('status', ModelConstant::STATUS_ON)->field(['pixel_id'])->select()->toArray();
        return array_column($pixelIds, 'pixel_id');
    }

}
